package com.app.signing.app

import android.app.Activity
import android.util.Log
import android.view.View
import android.view.inputmethod.InputMethodManager

/**
 * @author wangpeifeng
 * @date 2018/05/07 13:33
 */

const val TAG = "Signing_APP"

const val ADMIN_ID = "011287"

const val ADMIN_PWD = "111111"

fun String.logd(tag: String = TAG) {
    Log.d(tag, this)
}

fun String.loge(tag: String = TAG) {
    Log.e(tag, this)
}

fun String.logi(tag: String = TAG) {
    Log.i(tag, this)
}

fun Activity.hideSoftInput() {
    val imm = this.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
    var view = this.currentFocus
    if (view == null) view = View(this)
    imm.hideSoftInputFromWindow(view.windowToken, 0)
}